<?php
/* Smarty version 3.1.34-dev-7, created on 2020-07-09 16:09:02
  from 'D:\php_demo\kindergarten\application\views\templates\article_list.html' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.34-dev-7',
  'unifunc' => 'content_5f06d09e0217d7_80533815',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'd59a688e180240fda8519fc6724a09c3060e33bb' => 
    array (
      0 => 'D:\\php_demo\\kindergarten\\application\\views\\templates\\article_list.html',
      1 => 1594282075,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5f06d09e0217d7_80533815 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_loadInheritance();
$_smarty_tpl->inheritance->init($_smarty_tpl, true);
?>

<?php 
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_8456706785f06d09e01f474_34160769', 'body1');
?>


<?php 
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_14664399325f06d09e0201c5_11254957', 'body2');
?>

<?php $_smarty_tpl->inheritance->endChild($_smarty_tpl, 'all_box.html');
}
/* {block 'body1'} */
class Block_8456706785f06d09e01f474_34160769 extends Smarty_Internal_Block
{
public $subBlocks = array (
  'body1' => 
  array (
    0 => 'Block_8456706785f06d09e01f474_34160769',
  ),
);
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>

<div class="layout g-main_content clearfix">
	<!-- 新闻列表 -->
	<div class="fl g-chief">
		<div class="artcle-list">
			<!--        <div class="row">
          <div class="img"><a href="#" target="_blank"><img src="http://sy.sywgy.com/wp-content/uploads/sites/2/2020/06/AB70865515E4B2BBD931E0DC287C5326-495x400.jpg"></a></div>
          <div class="info">
            <div class="time">2020-05-09</div>
            <h2><a href="#" target="_blank">非常时期云外交 习近平这个理念一以贯之</a></h2>
            <div class="desc">新冠肺炎疫情发生以来，习近平主席始终坚持人民至上理念，在统筹做好本国疫情防控和经济社会发展工作的同时，频繁与多个国家领导人及国际组织负责人保持电话</div>
            <a class="btn-detail" href="#" target="_blank">查看详情>></a> </div>
        </div> -->
			<div v-for="item in news_arrs" :key="item.id" class="row" v-on:click="click1(item)">
				<div class="img"><a href="#" target="_blank"><img :src="item.title_url"></a></div>
				<div class="info">
					<div class="time">{{ item.time }}</div>
					<h2><a target="_blank">{{ item.title }}</a></h2>
					<div class="desc">{{ item.introduction }}</div>
					<a class="btn-detail" href="#" target="_blank">查看详情>></a>
				</div>
			</div>

		</div>
		<div style="margin-top: 10px;">
			<el-pagination :page-size="limit" layout="prev, pager, next" :total="conunt" @current-change="handleCurrentChange">
			</el-pagination>
		</div>

	</div>



	<div class="fr g-side" v-on:click="click1(news_arrs[0])">
		<h3 class="hd">最新文章</h3>
		<ul class="art-list">
			<li>
				<div class="img"><img :src="news_arrs[0].title_url"></div>
				<div class="info">
					<h2>{{ news_arrs[0].title }}</h2>
					<div class="time">{{ news_arrs[0].time }}</div>
				</div>
			</li>
		</ul>
	</div>
</div>
<?php
}
}
/* {/block 'body1'} */
/* {block 'body2'} */
class Block_14664399325f06d09e0201c5_11254957 extends Smarty_Internal_Block
{
public $subBlocks = array (
  'body2' => 
  array (
    0 => 'Block_14664399325f06d09e0201c5_11254957',
  ),
);
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>

<link href="https://cdn.bootcdn.net/ajax/libs/element-ui/2.13.2/theme-chalk/index.css" rel="stylesheet">
<?php echo '<script'; ?>
 src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"><?php echo '</script'; ?>
>
<!-- import Vue before Element -->
<?php echo '<script'; ?>
 src="/html/vue.js"><?php echo '</script'; ?>
>
<!-- import JavaScript -->
<?php echo '<script'; ?>
 src="https://cdn.bootcdn.net/ajax/libs/element-ui/2.13.2/index.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 type="text/javascript" src="/html/wangEditor.min.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 type="text/javascript">
	var app = new Vue({
		el: '#app',
		data: {
			message: 'Hello Vue!',
			name: "Vue",
			content: '<h1>222</h1>',
			page: 1,
			limit: 10,
			conunt: 1000,
			title1: 1, //用于排列头部或者第二个头部
			title2: 1,
			title1_arrs: title1_arrs,
			news_arrs: []
		},
		methods: {
			click1: function(row) {
				var me = this;
				console.log('click1......');
				console.log(row);
				//sessionStorage.setItem("new_id", row.id);
				window.location.href = "/index.php/html_to/article_detail?id=" + row.id;
			},
			click2: function() {
				console.log('click2......');
			},
			handleCurrentChange(val) {
				var me = this;
				console.log(val);
				axios.get('/index.php/server/frontdesk/get_newss', {
						params: {
							page: val,
							limit: me.limit
						}
					})
					.then(function(response) {
						console.log(response);
						me.news_arrs = response.data;
					})
					.catch(function(error) { // 请求失败处理
						//console.log(error);
					});
			}
		},
		created: function() {
			var me = this;
			me.title1 = 3;
			//获取数量
			axios.get('/index.php/server/frontdesk/news_count', {
					params: {

					}
				})
				.then(function(response) {
					console.log(response);
					me.conunt = response.data;
				})
				.catch(function(error) { // 请求失败处理
					//console.log(error);
				});

			axios.get('/index.php/server/frontdesk/get_newss', {
					params: {
						page: me.page,
						limit: me.limit
					}
				})
				.then(function(response) {
					console.log(response);
					me.news_arrs = response.data;
				})
				.catch(function(error) { // 请求失败处理
					//console.log(error);
				});
		}
	});
<?php echo '</script'; ?>
>
<?php
}
}
/* {/block 'body2'} */
}
